package com.john.design.创建性模型.建造者模式;

/**
 * @Author: JohnCoding
 * @Description:
 * @date: 2020/8/10 23:30
 */
public class Coach {

    private CourseBuilder courseBuilder;

    public void setCourseBuilder(CourseBuilder courseBuilder) {
        this.courseBuilder = courseBuilder;
    }

    public Course buildCourse(String name,String type,String qa,String ppt){
        courseBuilder.buildName(name);
        courseBuilder.buildPPT(ppt);
        courseBuilder.buildQa(qa);
        courseBuilder.buildType(type);
        return courseBuilder.build();
    }

}
